package org.gap.wizards.items.construction;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.gap.wizards.effects.Effect;
import org.gap.wizards.items.Description;
import org.gap.wizards.items.Item;
import org.gap.wizards.pc.PlayerCharacter;

public class MakingStation extends Item {
	private List<Instructions> howToBook;

	public MakingStation() {
		this(null);
	}
	
	public MakingStation(Description description) {
		super(Effect.NONE, description);
		howToBook = new ArrayList<Instructions>();
	}
	
	public void addInstructions(Instructions... instructions) {
		this.howToBook.addAll(Arrays.asList(instructions));
	}

	public Item make(PlayerCharacter pc, Item...itemsToCombine) {
		for (Instructions each : howToBook) {
			if (each.usableItems(itemsToCombine)) {
				return each.make(pc, itemsToCombine);
			}
		}
		return null;
	}

	
}
